#!/bin/bash
file="file1"
find / -type f -perm +6000 > $file
hs=`cat $file | wc -l`
echo $hs
for (( i=0;i<$hs;i++ ))
do
   fname=`sed -n '1'p $file`
   sed -i '1d' $file
   echo "change the file:$fname input Y or N:"
   read choice
     while [ "$choice" != "Y" -a "$choice" != "N" ]
         do
         if [ "$choice" = "exit" ]
         then
         rm $file
         exit 0
         fi
     echo "wrong!"
    echo "change the file:$fname input Y or N or exit:"
    read choice
    done
    if [ "$choice" = "Y" ]
    then
      chmod a-s $fname
      echo "succeed"
      echo "next file"
    else
      echo "next file"
fi
done
rm $file

